﻿using KAKA.Domain;
using Morus.Infrastructure;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace KAKA.Repository
{
    public interface IMessageRepository : IRepository<Message>
    {
        Message GetPost(Guid postId);
        Appetizer GetAppetizer(Guid appetizerId);
    }

    public class MessageRepository : Repository<Message>, IMessageRepository
    {
        public MessageRepository(Database database)
            : base(database)
        {
        }

        public Message GetPost(Guid postId)
        {
            throw new NotImplementedException();
        }

        public Appetizer GetAppetizer(Guid appetizerId)
        {
            return Database.Set<Appetizer>().Where(r => r.Id == appetizerId).FirstOrDefault();
        }
    }
}
